//
//  LBLoopScrollViewCell.m
//  LBLoopScrollView
//
//  Created by LINAICAI on 2017/6/14.
//  Copyright © 2017年 LINAICAI. All rights reserved.
//

#import "LBLoopScrollViewCell.h"

@interface LBLoopScrollViewCell()

@end
@implementation LBLoopScrollViewCell
- (UIImageView *)imageView{
    if (!_imageView) {
        _imageView = [[UIImageView alloc]init];
        //防止图片比例变形并切割图片不能超过cell
        _imageView.contentMode = UIViewContentModeScaleAspectFill;
        _imageView.clipsToBounds = YES;
    }
    return _imageView;
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.imageView];
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.frame = self.contentView.bounds;
}
@end
